#define x 10
#define y 10
#include<stdio.h>


int main()
{
	int arr[x][y];

	for (int i = 0; i < x; i++)
	{
		int j = 0;
		for ( j = 0; j <=i; j++)
		{
			if (j==0||i==j)
			{
				arr[i][j] = 1;
			}
			else
			{
				arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			}

		}
	}

	for (int a = 0; a < x; a++)
	{	
		
		for (int b = 0; b <=a; b++)
		{
			printf("%6d", arr[a][b]);
		}
		printf("\n");
	}
	return 0;
}